package com.zf.yichat.mapper;

import com.zf.yichat.base.FsMapper;
import com.zf.yichat.model.MessageUltragroup;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MessageUltragroupMapper extends FsMapper<MessageUltragroup> {

    /**
     * 更新超级群的状态
     * @param ultragroupId
     * @param status
     */
    void ultragroupUpdateStatus(@Param("ultragroupId") Long ultragroupId, @Param("status") String status);

    /**
     * 更新超级群的群名称
     * @param ultragroupId
     * @param ultragroupName
     */
    void ultragroupUpdateChatroom(@Param("ultragroupId") Long ultragroupId,
                                  @Param("ultragroupName") String ultragroupName,
                                  @Param("avatar") String avatar,
                                  @Param("approval") String approval);

    /**
     * 根据ultragroupId查询超级群
     * @param ultragroupId
     * @return
     */
    MessageUltragroup selectOneByUltragroupId(@Param("ultragroupId") String ultragroupId);

    /**
     * 查询用户加入的超级群列表
     * @param userId
     * @return
     */
    List<MessageUltragroup> queryJoinUltragroup(@Param("userId") Long userId);
}